package com.yanu.trace.t2s.util;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GExceptionHandler {
    @ExceptionHandler(Exception.class)
    public Message error(Exception e) {
        System.out.println(e.getMessage());
        return new Message(501,e.getMessage(),null);
    }
}
